<template>
  <Suspense>
    <template #default>
      <AsyncComponent />
    </template>
    <template #fallback>
      <div>loading...</div>
    </template>
  </Suspense>
</template>
<script setup>
  import { defineAsyncComponent } from 'vue';
  // import AsyncComponent from '@/components/asyncComponent'
  // const AsyncComponent = defineAsyncComponent(
  //   () => import('@/components/asyncComponent'),
  //   {
  //     error: (error, retry, fail, fallback) => {
  //       console.log(err, '组件报错信息');
  //       fallback(<div>默认错误占位使用</div>)
  //     },
  //     delay: 200,
  //     timeout: 3000
  //   }
  // );
  console.log('suspense');
</script>